package com.har.modules.web.controller;

import com.har.common.utils.PageUtils;
import com.har.common.utils.R;
import com.har.modules.web.entity.PremiumRuleEntity;
import com.har.modules.web.service.PremiumRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;



/**
 * 保费规则
 *
 * @author maoruidd
 * @email 
 * @date 2018-09-17 14:20:44
 */
@RestController
@RequestMapping("/rule")
public class PremiumRuleController {
    @Autowired
    private PremiumRuleService premiumRuleService;

    /**
     * 列表
     */
    @RequestMapping("/list")

    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = premiumRuleService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping(value = "/info")
    public R info(@RequestParam Map<String, Object> params){
        PremiumRuleEntity premiumRule = premiumRuleService.queryRule(params);

        return R.ok().put("premiumRule", premiumRule);
    }
}
